package com.budgetme.ui.fragments;


import com.budgetme.R;
import com.budgetme.database.Database;

import android.app.Activity;
import android.content.ContentResolver;
import android.net.Uri;
import android.os.Bundle;
import android.text.InputType;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;

public class IncomeDetailsFragment extends DetailsFragment {
	private static final String TAG = "IncomeDetailsFragment";
	
	private Activity mParentActivity;
	private ContentResolver mContentResolver;
	
	private TextView mIncomeNameField;
	private EditText mIncomeAmountField;
	
	@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		Log.d(TAG, "onCreateView");
		
		View fragment = inflater.inflate(R.layout.income_details_fragment, container, false);
		
		mIncomeNameField = (TextView) fragment.findViewById(R.id.income_details_income_name);
		mIncomeAmountField = (EditText) fragment.findViewById(R.id.income_details_income_amount);
		
		mIncomeAmountField.setInputType(InputType.TYPE_NULL);
		
		return fragment;
	}

	@Override
	protected TextView[] getTo() {
		return new TextView[] {mIncomeNameField, mIncomeAmountField};
	}

	@Override
	protected String[] getFrom() {
		return new String[] {Database.tbl_income.i_name, Database.tbl_income.i_amount};
	}

	@Override
	protected Uri getUri() {
		return Uri.withAppendedPath(Database.tbl_income.CONTENT_URI, String.valueOf(mId));
	}
	
//	income_details_income_name
//	income_details_income_amount
	
	
	
	
	
	
}
